package org.atovio.structure.tree;

/**
 * 三叉链表结点类
 * @author AtoVio, Winter Yuan
 * @version 1.0
 */
public class TriNode<T> {
    // 数据域
    public T data;
    // 指向父结点
    public TriNode<T> parent;
    // 指向左孩子
    public TriNode<T> left;
    // 指向右孩子
    public TriNode<T> right;

    // 构造结点
    public TriNode(T data, TriNode<T> parent, TriNode<T> left, TriNode<T> right){
       this.data = data;
       this.parent = parent;
       this.left = left;
       this.right = right;
    }
    // 构造叶子结点
    public TriNode(T data){
        this.data = data;
    }
}
